package lab02.test04;

public class Staff {
    //为Staff类定义属性，private（私有的，只能在Staff类中使用）
    private String stName;
    private String stNo;
    private float stSalary;
    private float stSalaryGrowth;
    //定义空参和有参构造
    public Staff(){}

    public Staff(String stName, String stNo, float stSalary){
        this.stName = stName;
        this.stNo = stNo;
        this.stSalary = stSalary;
    }

    //通过get和set方法对属性进行初始化
    public String getStName() {
        return stName;
    }

    public void setStName(String stName) {
        this.stName = stName;
    }

    public String getStNo() {
        return stNo;
    }

    public void setStNo(String stNo) {
        this.stNo = stNo;
    }

    public float getStSalary() {
        return stSalary;
    }

    public void setStSalary(float stSalary) {
        this.stSalary = stSalary;
    }

    public void stName(){
        System.out.println("姓名：" + stName);
    }
    public void stNo(){
        System.out.println("号码：" + stNo);
    }
    public void stSalary(){
        System.out.println("基本薪水：" + stSalary);
    }
    public void stSalaryGrowth(float stWorkTimeSalary,int stWorkTime){
        stSalaryGrowth = stWorkTimeSalary * stWorkTime;
        System.out.println("薪水增长额：" + stSalaryGrowth);
    }
    public void stSalarySum(float stSalarySum){
        stSalarySum = stSalaryGrowth + stSalary;
        System.out.println("工资总额：" + stSalarySum);
    }
}
